package com.lianzhihui.romeex.bean;

import com.lianzhihui.romeex.R;

import java.io.Serializable;
import java.util.List;

/**
 * @ProjectName: romeex
 * @Package: com.lianzhihui.romeex.bean
 * @ClassName: TradeRecordBean
 * @Description: java类作用描述
 * @Author: zhanghong
 * @CreateDate: 2020/11/11 11:00
 * @UpdateUser: 更新者：
 * @UpdateDate: 2020/11/11 11:00
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */

public class TradeRecordEarningsBean implements Serializable {


    /**
     * pages : 5
     * pageSize : 10
     * page : 1
     * content : [{"timeStamp":1607529602946,"addTime":1607529602946,"balance":"3558.10795081","coinName":"RET","id":"5fd0f483ad7ef117b0243fe0","walletAddress":"13yNMZ2RSqM2ho7MRAFFMsJdrcjZWWxTQ3","coinNameCobo":"RET","tradeType":0,"addTimeStr":"2020-12-10 00:00:02"}]
     */

    private Integer pages;
    private Integer pageSize;
    private Integer page;
    private List<ContentBean> content;


    public Integer getPages() {
        return pages;
    }

    public void setPages(Integer pages) {
        this.pages = pages;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public List<ContentBean> getContent() {
        return content;
    }

    public void setContent(List<ContentBean> content) {
        this.content = content;
    }

    public static class ContentBean {
        /**
         * timeStamp : 1607529602946
         * addTime : 1607529602946
         * balance : 3558.10795081
         * coinName : RET
         * id : 5fd0f483ad7ef117b0243fe0
         * walletAddress : 13yNMZ2RSqM2ho7MRAFFMsJdrcjZWWxTQ3
         * coinNameCobo : RET
         * tradeType : 0
         * addTimeStr : 2020-12-10 00:00:02
         */

        private Long timeStamp;
        private Long addTime;
        private String balance;
        private String coinName;
        private String id;
        private String walletAddress;
        private String coinNameCobo;
        private Integer tradeType;
        private String addTimeStr;

        public String getTitle() {
            //999 其他激励 1质押收益 2质押扣除 3 划进 4 划出 5质押手续费 6私募激励 7质押释放
            switch (tradeType) {
                case 1:
                    //1质押收益
                    return "质押收益";
                case 2:
                    //2质押扣除
                    return "收益质押";
                case 3:
                    //划进
                    return "划进";
                case 4:
                    //划出
                    return "划出";
                case 5:
                    //5质押手续费
                    return "质押手续费";
                case 6:
                    //6私募激励
                    return "私募收益";
                case 7:
                    //7质押释放
                    return "质押释放";
                default:
                    return "其他";
            }
        }

        public int getIconType() {
            //999 其他激励 1质押收益 2质押扣除 3 划进 4 划出 5质押手续费 6私募激励 7质押释放
            switch (tradeType) {
                case 1:
                    //1质押收益
                    return R.drawable.icon_details_income;
                case 6:
                    //6私募激励
                    return R.drawable.icon_placement;
                case 7:
                    //7质押释放
                    return R.drawable.icon_freed;
                case 2:
                    //2质押扣除
                    return R.drawable.icon_income_details;
                case 3:
                case 4:
                case 5:
                    //5质押手续费
                    //4划出
                    //3划进
                default:
                    return R.drawable.icon_otherincome;
            }
        }

        public Long getTimeStamp() {
            return timeStamp;
        }

        public void setTimeStamp(Long timeStamp) {
            this.timeStamp = timeStamp;
        }

        public Long getAddTime() {
            return addTime;
        }

        public void setAddTime(Long addTime) {
            this.addTime = addTime;
        }

        public String getBalance() {
            if (Double.parseDouble(balance) > 0) {
                return "+" + balance;
            }
            return balance;
        }

        public void setBalance(String balance) {
            this.balance = balance;
        }

        public String getCoinName() {
            return coinName;
        }

        public void setCoinName(String coinName) {
            this.coinName = coinName;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getWalletAddress() {
            return walletAddress;
        }

        public void setWalletAddress(String walletAddress) {
            this.walletAddress = walletAddress;
        }

        public String getCoinNameCobo() {
            return coinNameCobo;
        }

        public void setCoinNameCobo(String coinNameCobo) {
            this.coinNameCobo = coinNameCobo;
        }

        public Integer getTradeType() {
            return tradeType;
        }

        public void setTradeType(Integer tradeType) {
            this.tradeType = tradeType;
        }

        public String getAddTimeStr() {
            return addTimeStr;
        }

        public void setAddTimeStr(String addTimeStr) {
            this.addTimeStr = addTimeStr;
        }
    }
}
